package com.woniuxueyuan.entity.dto;

import com.woniuxueyuan.entity.Address;
import com.woniuxueyuan.entity.UserCart;
import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;

public class UserCartDTO {
    private Integer id;
    private Integer buyNum;
    private BigDecimal buyPrice; //单价
    private BigDecimal totalPrice; //总价格
    private Integer userId;
    public UserCartDTO(UserCart userCart){
        //把PO属性赋值给DTO
        //参数1：po  参数2：DTO
        BeanUtils.copyProperties(userCart,this);
    }
}
